<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simTubeStatus</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simTubeStatus" id="simTubeStatus"></a>simTubeStatus / sim.tubeStatus </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Checks the status of a communication tube previously opened with <a href="simTubeOpen.htm">sim.tubeOpen</a>.<br></td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simTubeStatus(simInt tubeHandle,simInt* readPacketsCount,simInt* writePacketsCount)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>tubeHandle</strong>: the handle of the tube that was returned by the <a href="simTubeOpen.htm">simTubeOpen</a> function.</div>
<div><strong>readPacketsCount</strong>: pointer to an integer that will indicate the number of packets waiting to be read. Can be nullptr</div>
<div><strong>writePacketsCount</strong>: pointer to an integer that will indicate the number of packets waiting to be read on the other side of the tube. Can be nullptr<br>
</div>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 if operation was not successful, 0 if the tube is not connected, 1 if the tube is connected<br>
</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number status,number readPacketsCount,number writePacketsCount=sim.tubeStatus(number tubeHandle)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>Similar to the C-function counterpart</div>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>status</strong>: 0 if the tube is not connected, 1 if the tube is connected</div>
<div><strong>readPacketsCount</strong>: the number of packets waiting to be read</div>
<div><strong>writePacketsCount</strong>: the number of packets waiting to be read on the other side of the tube</div>
</td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
